#ifndef PATIENT_H
#define PATIENT_H

#include <QMainWindow>
#include <QDateEdit>
#include <QPushButton>
#include <QLineEdit>
#include <QLabel>
#include <QMessageBox>
#include <QSql>
#include <QDebug>
#include <QtSql/QSqlError>
#include <QtSql/QSqlQuery>
namespace Ui {
class patient;
}

class patient : public QMainWindow
{
    Q_OBJECT

public:
    explicit patient(QWidget *parent = 0,const QString=NULL  ,const QString=NULL );
    ~patient();
    QString name_text;//接受来自登陆信息的用户名
    QString passwd_text;//接受来自登陆信息的密码
    QString room_num;//病房号
private:
    Ui::patient *ui;
    QDateEdit *date;
     QLabel *name;
     QLabel *name_value;
      QLabel *Number;
      QLabel *Number_value;
      QLabel *use_v;
      QLabel *use_line;
      QLabel *money;
      QLabel *money_line;
      QLabel *money_unit;
      QLabel *A_money;
      QLabel *A_money_line;
      QLabel *A_money_unit;
      QPushButton *Warning_ptn;
      QPushButton *exit_ptn;
      QLabel *message_left;
      QLabel *message_right;
      QSqlDatabase db;
      QSqlQuery query;
     int DATA_Display();
     bool CON_MYSQL_Patient();
protected slots:
      void exit_ptn_clicked();
      void Warning_ptn_clicked();
};

#endif // PATIENT_H
